Skip to content

fix: preserve SQL highlighting with Jinja templates - #15634

Merged
teamleaderleo merged 2 commits into
manaflow-ai:mainfrom
teamleaderleo:fix/issue-15481-jinja-highlighting
Sep 29, 2026
Merged

teamleaderleo merged 2 commits into
manaflow-ai:mainfrom
teamleaderleo:fix/issue-15481-jinja-highlighting

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • configure the File Preview Highlightr adapter to ignore grammar-illegal template delimiters
  • retain SQL token highlighting for dbt/Jinja files containing {{ ... }} or {% ... %}
  • add a regression test that checks SQL keyword token colors survive Jinja delimiters

Verification

  • Test commit: 8cdd4e04a868 (expected red before the fix)
  • Fix commit follows as a separate commit so CI proves the regression test catches the bug.
  • Native Xcode compilation is intentionally delegated to fleet CI; no MacBook Air build was run.

Closes #15481


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Fixes File Preview losing SQL keyword colors in dbt files that embed Jinja templates.

  • Sets Highlightr's ignoreIllegals so grammar-illegal characters like {{ ... }} no longer abort highlighting of the whole document.
  • Adds a regression test asserting select still renders as 0091FF in source containing {{ ref('users') }}.

Written for commit 6d185c5. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 28 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 2bd882ab-7f43-45c6-82a3-0143cb5759d7

📥 Commits

Reviewing files that changed from the base of the PR and between 4e0f7d2 and 6d185c5.

📒 Files selected for processing (2)
  • Packages/Shared/CmuxSyntaxHighlighting/Sources/CmuxSyntaxHighlighting/HighlightrThemeAdapter.swift
  • Packages/Shared/CmuxSyntaxHighlighting/Tests/CmuxSyntaxHighlightingTests/HighlightrSyntaxEngineTests.swift

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@teamleaderleo
teamleaderleo marked this pull request as ready for review September 29, 2026 15:59
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

CI fast guards passes on 6d185c5a39 (https://github.com/manaflow-ai/cmux/actions/runs/36595072417).

@github-actions

Copy link
Copy Markdown
Contributor

CI failure attribution

CI failed on 1c6efd249f (run 36594129962 attempt 1): 1 code, 2 unknown.

Job Verdict Why
macos / swift-package-tests code a compile error
guards / workflow-guard-tests / preflight unknown no known signature; failed step: Validate macOS runner guards
guards / workflow-guard-tests / ci unknown no known signature; failed step: Run canonical CMUX CI guard profile
Matched log lines
macos / swift-package-tests: /Users/runner/_work/cmux/cmux/Packages/Shared/CmuxSyntaxHighlighting/Tests/CmuxSyntaxHighlightingTests/HighlightrSyntaxEngineTests.swift:43:57: error: missing argument label 'from:' in call

Not re-run automatically: macos / swift-package-tests, guards / workflow-guard-tests / preflight, guards / workflow-guard-tests / ci are not machine failures.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's.

@teamleaderleo
teamleaderleo force-pushed the fix/issue-15481-jinja-highlighting branch from 1c6efd2 to 4f27fae Compare September 29, 2026 16:02
@cursor

cursor Bot commented Sep 29, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@teamleaderleo
teamleaderleo force-pushed the fix/issue-15481-jinja-highlighting branch from 4f27fae to 6d185c5 Compare September 29, 2026 16:04
@teamleaderleo
teamleaderleo enabled auto-merge (squash) September 29, 2026 16:05
@teamleaderleo
teamleaderleo merged commit 9b0d37a into manaflow-ai:main Sep 29, 2026
73 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Merge receipt for 6d185c5a39: every check was green at merge (25 verified; 20 skipped by policy). Full suite runs on main after merge.

rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 29, 2026
9b0d37a fix: preserve SQL highlighting with Jinja templates (manaflow-ai#15634)
5850596 Use measured account-wide load in CI pickers (manaflow-ai#15609)
38e56ec docs: make CI runner policy the fleet routing owner (manaflow-ai#15638)
ab564a4 Keep the admitted session when a superseded control owner's dial lands (manaflow-ai#15197)

# Conflicts:
#	.github/workflows/ci-macos.yml
#	.github/workflows/ci.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File Preview: SQL with Jinja/dbt templating shows no syntax highlighting (highlight.js aborts on {)

1 participant